package com.lanmaoly.study.service.impl;

import com.lanmaoly.study.service.AuthService;
import org.springframework.stereotype.Service;

/**
 * Created by chao.xia on 2018/1/7 14:51
 */
@Service
public class AuthServiceImpl implements AuthService {

    /**
     * 认证
     *
     * @param name name
     */
    @Override
    public void auth(String name) {
        if ("admin".equals(name)) {
            System.out.println("认证通过");
        }else {
            throw new RuntimeException("认证失败");
        }
    }
}
